import request from '@/utils/request'

interface IGetNotofocationAPIParams {
    type: 1 | 2 // 1 订单 2. 系统
}

export const getNotofocationAPI = (data: IGetNotofocationAPIParams) => {
    return request.get({
        url: '/admin/m/message/page',
        data
    })
}

export const readBatchAPI = (data: { hasRead: boolean } & IGetNotofocationAPIParams) => {
    return request.put({
        url: '/admin/m/message/readBatch',
        data
    })
}
// 获取系统通知 订单通知未读数量
export const getNotoficationUnreadCountAPI = () => {
    return request.get({
        url: '/admin/m/message/unreadCount'
    })
}
